#include "KnowledgeBaseElement.h"

//////////////////////////////////////////////////////////////////////////////////////////////////////////////

Factory < KnowledgeBaseElementInterface > KnowledgeBaseElement::factory;

KnowledgeBaseElementInterfacePtr KnowledgeBaseElement::Spawn ( std::string argLexemText )
{
	KnowledgeBaseElementPtr element = factory.CreateNewObject < KnowledgeBaseElement > ();
	element->lexemText = argLexemText;
	return element;
}

void KnowledgeBaseElement::CheckInnocence ()
{
	assert ( factory.ObjectsCount () == 0 );
}

KnowledgeBaseElement::KnowledgeBaseElement ()
: seniorKey ( 0 )
, seniorType ( 0 )
, upperBranch ( false )
, lowerBranch ( false )
, nextLevel ( 0 )
, synonym ( 0 )
, adjacentAscending ( 0 )
, adjacentDescending ( 0 )
, beforeAdjacentAscending ( 0 )
, beforeAdjacentDescending ( 0 )
, greaterAscending ( 0 )
, greaterDescending ( 0 )
, lesserAscending ( 0 )
, lesserDescending ( 0 )
{
}

int KnowledgeBaseElement::SeniorKey ()
{
	return seniorKey;
}

int KnowledgeBaseElement::SeniorType ()
{
	return seniorType;
}

std::string KnowledgeBaseElement::LexemText ()
{
	return lexemText;
}

bool KnowledgeBaseElement::UpperBranch ()
{
	return upperBranch;
}

bool KnowledgeBaseElement::LowerBranch ()
{
	return lowerBranch;
}

int KnowledgeBaseElement::NextLevel ()
{
	return nextLevel;
}

int KnowledgeBaseElement::Synonym ()
{
	return synonym;
}

int KnowledgeBaseElement::AdjacentAscending ()
{
	return adjacentAscending;
}

int KnowledgeBaseElement::AdjacentDescending ()
{
	return adjacentDescending;
}

int KnowledgeBaseElement::BeforeAdjacentAscending ()
{
	return beforeAdjacentAscending;
}

int KnowledgeBaseElement::BeforeAdjacentDescending ()
{
	return beforeAdjacentDescending;
}

int KnowledgeBaseElement::GreaterAscending ()
{
	return greaterAscending;
}

int KnowledgeBaseElement::GreaterDescending ()
{
	return greaterDescending;
}

int KnowledgeBaseElement::LesserAscending ()
{
	return lesserAscending;
}

int KnowledgeBaseElement::LesserDescending ()
{
	return lesserDescending;
}

void KnowledgeBaseElement::SetSeniorKey ( int argSeniorKey )
{
	seniorKey = argSeniorKey;
}

void KnowledgeBaseElement::SetSeniorType ( int argSeniorType )
{
	seniorType = argSeniorType;
}

void KnowledgeBaseElement::SetUpperBranch ( bool argUpperBranch )
{
	upperBranch = argUpperBranch;
}

void KnowledgeBaseElement::SetLowerBranch ( bool argLowerBranch )
{
	lowerBranch = argLowerBranch;
}

void KnowledgeBaseElement::SetNextLevel ( int argNextLevel )
{
	nextLevel = argNextLevel;
}

void KnowledgeBaseElement::SetSynonym ( int argSynonym )
{
	synonym = argSynonym;
}

void KnowledgeBaseElement::SetAdjacentAscending ( int argAdjacentAscending )
{
	adjacentAscending = argAdjacentAscending;
}

void KnowledgeBaseElement::SetAdjacentDescending ( int argAdjacentDescending )
{
	adjacentDescending = argAdjacentDescending;
}

void KnowledgeBaseElement::SetBeforeAdjacentAscending ( int argBeforeAdjacentAscending )
{
	beforeAdjacentAscending = argBeforeAdjacentAscending;
}

void KnowledgeBaseElement::SetBeforeAdjacentDescending ( int argBeforeAdjacentDescending )
{
	beforeAdjacentDescending = argBeforeAdjacentDescending;
}

void KnowledgeBaseElement::SetGreaterAscending ( int argGreaterAscending )
{
	greaterAscending = argGreaterAscending;
}

void KnowledgeBaseElement::SetGreaterDescending ( int argGreaterDescending )
{
	greaterDescending = argGreaterDescending;
}

void KnowledgeBaseElement::SetLesserAscending ( int argLesserAscending )
{
	lesserAscending = argLesserAscending;
}

void KnowledgeBaseElement::SetLesserDescending ( int argLesserDescending )
{
	lesserDescending = argLesserDescending;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
